package com.yiduo.outpost.ucenter.model.dto;

import com.yiduo.oustpost.core.validator.FieldsValueMatch;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;

/**
 * @Author yanwen
 * @create 2023/8/30 09:34
 */
@Data
@FieldsValueMatch(field = "password", fieldMatch = "passwordConfirm", message = "两次密码不一致")
public class SignUpRequestBody {
    @Schema(description = "用户名")
    @NotBlank(message = "SignUpRequestBody.username.NotBlank")
    private String username;
    @Schema(description = "密码")
    @NotBlank(message = "SignUpRequestBody.password.NotBlank")
    private String password;
    @Schema(description = "确认密码")
    @NotBlank(message = "SignUpRequestBody.passwordConfirm.NotBlank")
    private String passwordConfirm;
    @Schema(description = "邮箱")
    private String email;
    @Schema(description = "手机号")
    private String phone;
    @Schema(description = "年龄")
    private Integer age;

}
